<?php if(count($ctx->getJournals['result'])>0) { ?>
<tal:block tal:repeat="journals  getJournals/result">
<?php foreach($ctx->colors as $colors) { 
	if($colors['id'] == $ctx->journals['color_id'])
	{
		$imgColor = $colors['message_intensity'];
		$imgdesc = $colors['desc'];
	}
}
?>
<div class="MarTop10">
<div class="pad_bt5 BotBorder">
<div class="Fleft MarRgt10">
<div><img src="/images/TaskIcon.png" /></div>
<div class="txt_sm"><?php echo ago(strtotime($ctx->journals['added_date']));?></div>
</div>
<div class="Fleft">
<div><strong><a href="/journals/index/journals-view/<?php echo base64_encode($ctx->journals['id']).'/'.$ctx->startDate;?>" class="fontgrey txt13"><span tal:content="structure php: this.SubStrText(journals['description'], 40)">Des Here</span></a></strong></div>
<div class="pad_t5"><p><img src="/images/<?php echo $imgColor; ?>" title="<?php echo $imgdesc; ?>" />  &nbsp;&nbsp;<a class="EditLink" href="javascript:void(0);" onclick="editJournal('<?php echo $ctx->journals['id'];?>','<?php echo $ctx->startDate;?>');">Edit</a><strong>Updated Date: <?php echo ago(strtotime($ctx->journals['modified_date']));?></strong></p>
<div class="clear pad_t5"></div>
<div style="display:none">
<textarea class="wid260 hig20 txt12 GryBorder fontGry"></textarea>
<div class="clear" style="height:5px;"></div>
<a class="Button" href="#"><span>Save</span></a>
</div>

</div>

</div>
<div class="Fright MarRgt10">
<span><a href="javascript:void(0);" onclick="deleteJournal(<?php echo $ctx->journals['id'];?>,'<?php echo $ctx->getJournals['currentPage']; ?>','<?php echo $ctx->startDate; ?>');"><img src="/images/CloseIcon.png" alt="Delete" border="0" class="img_inline" title="Delete"/></a></span>
</div>
<div class="clear"></div>
</div>
</div>
</tal:block>
<div id="topPagerId" class="paginat"></div>
<?php } else { ?>
<div style="padding:100px 50px"><b><center>No journals found</center></b></div>
<?php } ?>
